        /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.Fechas;
import DTO.*;
import DAO.garantiasDAO;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Luis Olave 10
 */
public class TasacionGarantia extends javax.swing.JFrame {

    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();
    String auxNombre = "";
    tasacionGarantiaHipoDTO hipo;
    tasacionGarantiaAutoDTO auto;
    tasacionGarantiaCdpDTO cdp;
    tasacionGarantiaWarraDTO warra;
    
    
    
    public TasacionGarantia(usuarioDTO user) {
        
        this.user = user;
        initComponents();
        this.btnGrabarTasaGtia.setVisible(false);
        this.rbtRolSii.setSelected(true);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        lblLogo = new javax.swing.JLabel();
        lblIngresoGaraAuto = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel10 = new javax.swing.JPanel();
        pnlHipotecaria = new javax.swing.JPanel();
        txtHipoTasa = new javax.swing.JTextField();
        btnBuscarRolTasa = new javax.swing.JButton();
        pnlAutomotriz = new javax.swing.JPanel();
        txtAutoTasa = new javax.swing.JTextField();
        btnBuscarPatenteTasa = new javax.swing.JButton();
        pnlWarrant = new javax.swing.JPanel();
        txtWarraTasa = new javax.swing.JTextField();
        btnBuscarDUNTasa = new javax.swing.JButton();
        pnlCdp = new javax.swing.JPanel();
        txtCDPTasa = new javax.swing.JTextField();
        btnBuscarNumTasa = new javax.swing.JButton();
        pnlDatosPersoGara1 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtNombreGarTasa = new javax.swing.JTextField();
        txtApellMatGarTasa = new javax.swing.JTextField();
        txtApellPatGaraTasa = new javax.swing.JTextField();
        txtRutGaraTasa = new javax.swing.JTextField();
        btnMenuPrincipal = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtOtroComentarioTasaGara = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcionTasaGara = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        btnGrabarTasaGtia = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        txtResidualTasa = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtApeMaternoTasador = new javax.swing.JTextField();
        txtMontoCubTasaGtia = new javax.swing.JTextField();
        txtValorComercialTasa = new javax.swing.JTextField();
        txtValorContTasaGara = new javax.swing.JTextField();
        txtValorLiqTasaGara = new javax.swing.JTextField();
        txtAvaluoFiscalTasaGara = new javax.swing.JTextField();
        txtValorPesosTasaGtia = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        txtApePaternoTasador = new javax.swing.JTextField();
        txtNombreTasador = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        txtMontoInicial = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbSalidaImprimirGarantia = new javax.swing.JTable();
        btnImprimirGarantias = new javax.swing.JButton();
        btnMenuPrincipalTasacion = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        rbtRolSii = new javax.swing.JRadioButton();
        rbtPatente = new javax.swing.JRadioButton();
        rbtDun = new javax.swing.JRadioButton();
        rbtNumeroCdp = new javax.swing.JRadioButton();
        jPanel5 = new javax.swing.JPanel();
        txtBuscarIdGarantia = new javax.swing.JTextField();
        btnBuscarIdGarantia = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("TASACIÓN GARANTÍA");
        setResizable(false);

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        lblIngresoGaraAuto.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        lblIngresoGaraAuto.setText("TASACIÓN GARANTÍA");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jTabbedPane1.setPreferredSize(new java.awt.Dimension(800, 497));

        pnlHipotecaria.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ROL SII", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarRolTasa.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarRolTasa.setText("BUSCAR");
        btnBuscarRolTasa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarRolTasaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlHipotecariaLayout = new javax.swing.GroupLayout(pnlHipotecaria);
        pnlHipotecaria.setLayout(pnlHipotecariaLayout);
        pnlHipotecariaLayout.setHorizontalGroup(
            pnlHipotecariaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHipotecariaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlHipotecariaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtHipoTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBuscarRolTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlHipotecariaLayout.setVerticalGroup(
            pnlHipotecariaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHipotecariaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtHipoTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarRolTasa))
        );

        pnlAutomotriz.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE PATENTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarPatenteTasa.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarPatenteTasa.setText("BUSCAR");
        btnBuscarPatenteTasa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarPatenteTasaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlAutomotrizLayout = new javax.swing.GroupLayout(pnlAutomotriz);
        pnlAutomotriz.setLayout(pnlAutomotrizLayout);
        pnlAutomotrizLayout.setHorizontalGroup(
            pnlAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAutomotrizLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtAutoTasa)
                    .addComponent(btnBuscarPatenteTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlAutomotrizLayout.setVerticalGroup(
            pnlAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAutomotrizLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtAutoTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarPatenteTasa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlWarrant.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE CÓDIGO ÚNICO (D.U.N 14)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarDUNTasa.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarDUNTasa.setText("BUSCAR");
        btnBuscarDUNTasa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarDUNTasaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlWarrantLayout = new javax.swing.GroupLayout(pnlWarrant);
        pnlWarrant.setLayout(pnlWarrantLayout);
        pnlWarrantLayout.setHorizontalGroup(
            pnlWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlWarrantLayout.createSequentialGroup()
                .addGap(35, 35, 35)
                .addGroup(pnlWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnBuscarDUNTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtWarraTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(42, Short.MAX_VALUE))
        );
        pnlWarrantLayout.setVerticalGroup(
            pnlWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlWarrantLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtWarraTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarDUNTasa))
        );

        pnlCdp.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE NÚMERO CDP", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarNumTasa.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarNumTasa.setText("BUSCAR");
        btnBuscarNumTasa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarNumTasaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlCdpLayout = new javax.swing.GroupLayout(pnlCdp);
        pnlCdp.setLayout(pnlCdpLayout);
        pnlCdpLayout.setHorizontalGroup(
            pnlCdpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCdpLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCdpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtCDPTasa)
                    .addComponent(btnBuscarNumTasa, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlCdpLayout.setVerticalGroup(
            pnlCdpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCdpLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtCDPTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnBuscarNumTasa))
        );

        pnlDatosPersoGara1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtNombreGarTasa.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreGarTasa.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreGarTasa.setEnabled(false);

        txtApellMatGarTasa.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatGarTasa.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatGarTasa.setEnabled(false);

        txtApellPatGaraTasa.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatGaraTasa.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatGaraTasa.setEnabled(false);

        txtRutGaraTasa.setBackground(new java.awt.Color(255, 255, 102));
        txtRutGaraTasa.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutGaraTasa.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRutGaraTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPatGaraTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 133, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel39)
                        .addGap(18, 18, 18)
                        .addComponent(txtApellMatGarTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel40)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtNombreGarTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRutGaraTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtNombreGarTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPatGaraTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMatGarTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGara1Layout = new javax.swing.GroupLayout(pnlDatosPersoGara1);
        pnlDatosPersoGara1.setLayout(pnlDatosPersoGara1Layout);
        pnlDatosPersoGara1Layout.setHorizontalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGara1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGara1Layout.setVerticalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGara1Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnMenuPrincipal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPrincipal.setText(" MENÚ PRINCIPAL");
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel12.setText("HIPOTECARIA");

        jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel13.setText("AUTOMOTRIZ");

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("WARRANT");

        jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel15.setText("CDP");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGap(93, 93, 93)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel10Layout.createSequentialGroup()
                                        .addComponent(pnlHipotecaria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(pnlAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(pnlWarrant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(pnlCdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel10Layout.createSequentialGroup()
                                        .addGap(28, 28, 28)
                                        .addComponent(jLabel12)
                                        .addGap(79, 79, 79)
                                        .addComponent(jLabel13)
                                        .addGap(111, 111, 111)
                                        .addComponent(jLabel14)
                                        .addGap(128, 128, 128)
                                        .addComponent(jLabel15)))))
                        .addGap(0, 103, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(jLabel12))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(pnlAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pnlHipotecaria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(pnlWarrant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(pnlCdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(66, 66, 66)
                .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE)
                .addComponent(btnMenuPrincipal)
                .addGap(65, 65, 65))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel10);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtOtroComentarioTasaGara.setBackground(new java.awt.Color(255, 255, 102));
        txtOtroComentarioTasaGara.setColumns(20);
        txtOtroComentarioTasaGara.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtOtroComentarioTasaGara.setRows(5);
        txtOtroComentarioTasaGara.setToolTipText("");
        txtOtroComentarioTasaGara.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtOtroComentarioTasaGara.setEnabled(false);
        jScrollPane3.setViewportView(txtOtroComentarioTasaGara);

        txtDescripcionTasaGara.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcionTasaGara.setColumns(20);
        txtDescripcionTasaGara.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcionTasaGara.setRows(5);
        txtDescripcionTasaGara.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcionTasaGara.setEnabled(false);
        jScrollPane4.setViewportView(txtDescripcionTasaGara);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 646, Short.MAX_VALUE)
                    .addComponent(jScrollPane3))
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(250, 250, 250))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(97, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 855, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 467, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel12);

        btnGrabarTasaGtia.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnGrabarTasaGtia.setText("GRABAR");
        btnGrabarTasaGtia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGrabarTasaGtiaActionPerformed(evt);
            }
        });

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "TASACIÓN GARANTÍA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel2.setText("VALOR CONTABLE");

        jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel3.setText("VALOR LIQUIDEZ");

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("VALOR COMERCIAL");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("AVALÚO FISCAL");

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("MONTO RESIDUAL");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("VALOR EN PESOS");

        jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel9.setText("APELLIDO MATERNO TASADOR");

        jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel10.setText("MONTO CUBIERTO POR GTÍA.");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("APELLIDO PATERNO TASADOR");

        jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel11.setText("NOMBRE TASADOR");

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("MONTO INICIAL");

        txtMontoInicial.setBackground(new java.awt.Color(255, 255, 0));
        txtMontoInicial.setEnabled(false);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel7)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel9)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                            .addComponent(txtApeMaternoTasador, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel5)
                                .addComponent(jLabel6)
                                .addComponent(jLabel2)
                                .addComponent(jLabel3)
                                .addComponent(jLabel8))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(txtApePaternoTasador)
                                .addComponent(txtValorPesosTasaGtia, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)
                                .addComponent(txtAvaluoFiscalTasaGara, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)
                                .addComponent(txtValorLiqTasaGara, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)
                                .addComponent(txtValorContTasaGara, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel11)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtResidualTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtNombreTasador, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtValorComercialTasa, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 170, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtMontoCubTasaGtia, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)
                    .addComponent(txtMontoInicial))
                .addGap(17, 17, 17))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValorContTasaGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValorLiqTasaGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(3, 3, 3)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtAvaluoFiscalTasaGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel16)
                    .addComponent(txtMontoInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValorPesosTasaGtia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jLabel10)
                    .addComponent(txtMontoCubTasaGtia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtApePaternoTasador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txtApeMaternoTasador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtNombreTasador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValorComercialTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtResidualTasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addContainerGap(80, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton1.setText("MENÚ PRINCIPAL >>");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 352, Short.MAX_VALUE)
                        .addComponent(btnGrabarTasaGtia)
                        .addGap(230, 230, 230)
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(23, 23, 23))))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnGrabarTasaGtia)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))
                .addGap(69, 69, 69))
        );

        jTabbedPane1.addTab("TASACIÓN GARANTÍA", jPanel13);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ÁREA IMPRESIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        tbSalidaImprimirGarantia.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane1.setViewportView(tbSalidaImprimirGarantia);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
                .addContainerGap())
        );

        btnImprimirGarantias.setText("IMPRIMIR");
        btnImprimirGarantias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirGarantiasActionPerformed(evt);
            }
        });

        btnMenuPrincipalTasacion.setText("MENÚ PRINCIPAL");
        btnMenuPrincipalTasacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalTasacionActionPerformed(evt);
            }
        });

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "IDENTIFICACIÓN DE LA GARANTÍA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        buttonGroup1.add(rbtRolSii);
        rbtRolSii.setText("ROL SII");

        buttonGroup1.add(rbtPatente);
        rbtPatente.setText("PATENTE");

        buttonGroup1.add(rbtDun);
        rbtDun.setText("D.U.N. 14");

        buttonGroup1.add(rbtNumeroCdp);
        rbtNumeroCdp.setText("NÚMERO CDP");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rbtRolSii)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtPatente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)
                .addComponent(rbtDun)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtNumeroCdp)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtRolSii)
                    .addComponent(rbtPatente)
                    .addComponent(rbtDun)
                    .addComponent(rbtNumeroCdp)))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ID DE LA GARANTÍA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarIdGarantia.setText("BUSCAR");
        btnBuscarIdGarantia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarIdGarantiaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarIdGarantia)
                    .addComponent(btnBuscarIdGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(txtBuscarIdGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarIdGarantia))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnImprimirGarantias, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(199, 199, 199)
                        .addComponent(btnMenuPrincipalTasacion, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28))))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(323, 323, 323)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(245, Short.MAX_VALUE)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(253, 253, 253))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnImprimirGarantias)
                    .addComponent(btnMenuPrincipalTasacion))
                .addGap(15, 15, 15))
        );

        jTabbedPane1.addTab("IMPRIMIR", jPanel2);

        jLabel1.setText("MENÚ PRINCIPAL\\TASACIÓN GARANTÍA");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblLogo)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(114, 114, 114)
                        .addComponent(lblIngresoGaraAuto))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 860, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblIngresoGaraAuto)
                    .addComponent(lblLogo)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        setSize(new java.awt.Dimension(876, 638));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        TasacionGarantia.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed

    private void btnBuscarRolTasaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarRolTasaActionPerformed
        if (txtHipoTasa.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese ROL");
            this.btnGrabarTasaGtia.setVisible(false);
            this.txtHipoTasa.setText(null);
            this.txtAutoTasa.setText(null);
            this.txtWarraTasa.setText(null);
            this.txtCDPTasa.setText(null);
            totalALipmpiar();
        }
        else
        {
            hipo = reg.ModiGtabuscarPorRol(txtHipoTasa.getText());
            if (hipo.getId_tasa() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue tasada. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE TASACION.");
                txtRutGaraTasa.setText(hipo.getHipo().getRut_gara_hipo());
//                txtFolioGarTasa.setText(String.valueOf(hipo.getHipo().getFolio_garantia_hipo()));
                txtApellMatGarTasa.setText(hipo.getHipo().getApell_materno_hipo());
                txtApellPatGaraTasa.setText(hipo.getHipo().getApell_paterno_hipo());
                txtNombreGarTasa.setText(hipo.getHipo().getNombre_hipo());
                txtDescripcionTasaGara.setText(hipo.getHipo().getDescrip_hipo());
                txtOtroComentarioTasaGara.setText(hipo.getHipo().getComent_hipo());
                txtValorContTasaGara.setText(String.valueOf(hipo.getValor_contable_tasa()));
                txtValorLiqTasaGara.setText(String.valueOf(hipo.getValor_liquidez_tasa()));
                txtAvaluoFiscalTasaGara.setText(String.valueOf(hipo.getAvaluo_fiscal_tasa()));
                txtValorPesosTasaGtia.setText(String.valueOf(hipo.getValor_pesos_tasa()));
                txtApePaternoTasador.setText(hipo.getApellido_paterno_tasador());
                txtApeMaternoTasador.setText(hipo.getApellido_materno_tasador());
                txtNombreTasador.setText(hipo.getNombre_tasador());
                txtValorComercialTasa.setText(String.valueOf(hipo.getValor_comercial_tasa()));
                txtMontoCubTasaGtia.setText(String.valueOf(hipo.getMonto_cubierto_gara_tasa()));
                txtResidualTasa.setText(String.valueOf(hipo.getMonto_residual_tasa()));
                txtMontoInicial.setText(String.valueOf(hipo.getHipo().getMonto_inicial()));
                //metoto que oculta los paneles que no se ocupan
//                ocultarPanel(pnlHipotecaria);
                TasacionHecha();
                this.txtAutoTasa.setText(null);
                this.txtWarraTasa.setText(null);
                this.txtCDPTasa.setText(null);
                
            }
            else
            {
                garantiaHipotecariaDTO aux = reg.buscarPorRol(txtHipoTasa.getText());
                hipo.setHipo(aux);
                if (hipo.getHipo().getFolio_garantia_hipo() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    this.btnGrabarTasaGtia.setVisible(false);
                    this.txtHipoTasa.setText(null);
                    this.txtAutoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                    this.btnGrabarTasaGtia.setVisible(false);
                    totalALipmpiar();
                }
                else
                {
                    txtRutGaraTasa.setText(hipo.getHipo().getRut_gara_hipo());
//                    txtFolioGarTasa.setText(String.valueOf(hipo.getHipo().getFolio_garantia_hipo()));
                    txtApellMatGarTasa.setText(hipo.getHipo().getApell_materno_hipo());
                    txtApellPatGaraTasa.setText(hipo.getHipo().getApell_paterno_hipo());
                    txtNombreGarTasa.setText(hipo.getHipo().getNombre_hipo());
                    txtDescripcionTasaGara.setText(hipo.getHipo().getDescrip_hipo());
                    txtOtroComentarioTasaGara.setText(hipo.getHipo().getComent_hipo());
                    txtMontoInicial.setText(String.valueOf(hipo.getHipo().getMonto_inicial()));
                    TasacionNoHecha();
                    limpiar();
                    auxNombre = "Hipotecaria";
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlHipotecaria);
                    
                    this.txtAutoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                    
                }
            }
        }
    }//GEN-LAST:event_btnBuscarRolTasaActionPerformed

    private void btnGrabarTasaGtiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGrabarTasaGtiaActionPerformed
        switch(auxNombre)
        {
            case "Hipotecaria":
                tasacionGarantiaHipoDTO tasaHipo = new tasacionGarantiaHipoDTO();
                if (!txtValorContTasaGara.getText().equals("")) {
                    tasaHipo.setValor_contable_tasa(Integer.parseInt(txtValorContTasaGara.getText().trim()));
                }
                if (!txtValorLiqTasaGara.getText().equals("")) {
                    tasaHipo.setValor_liquidez_tasa(Integer.parseInt(txtValorLiqTasaGara.getText().trim()));
                }
                if (!txtAvaluoFiscalTasaGara.getText().equals("")) {
                    tasaHipo.setAvaluo_fiscal_tasa(Integer.parseInt(txtAvaluoFiscalTasaGara.getText().trim()));
                }
                if (!txtValorPesosTasaGtia.getText().equals("")) {
                    tasaHipo.setValor_pesos_tasa(Integer.parseInt(txtValorPesosTasaGtia.getText().trim()));
                }
                if (!txtValorComercialTasa.getText().equals("")) {
                    tasaHipo.setValor_comercial_tasa(Integer.parseInt(txtValorComercialTasa.getText().trim()));
                }
                if (!txtMontoCubTasaGtia.getText().equals("")) {
                    tasaHipo.setMonto_cubierto_gara_tasa(Integer.parseInt(txtMontoCubTasaGtia.getText().trim()));
                }
                if (!txtResidualTasa.getText().equals("")) {
                    tasaHipo.setMonto_residual_tasa(Integer.parseInt(txtResidualTasa.getText().trim()));
                }
                if (!txtApeMaternoTasador.getText().equals("")) {
                    tasaHipo.setApellido_materno_tasador(txtApeMaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaHipo.setApellido_paterno_tasador(txtApePaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaHipo.setNombre_tasador(txtNombreTasador.getText());
                }
                tasaHipo.setHipo(hipo.getHipo());
                int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Tasacion de garantia: HIPOTECARIA", "Tasacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta == 0) {
                    reg.TasacionGarantiaHipo(tasaHipo, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Tasacion Exitosa!");
                    MenuAdministrador admi = new MenuAdministrador(user);
                    admi.setVisible(true);
                    TasacionGarantia.this.dispose();
                }
                else
                {
                    
                }
                break;
            case "Automotriz":
                tasacionGarantiaAutoDTO tasaAuto = new tasacionGarantiaAutoDTO();
                if (!txtValorContTasaGara.getText().equals("")) {
                    tasaAuto.setValor_contable_tasa(Integer.parseInt(txtValorContTasaGara.getText().trim()));
                }
                if (!txtValorLiqTasaGara.getText().equals("")) {
                   tasaAuto.setValor_liquidez_tasa(Integer.parseInt(txtValorLiqTasaGara.getText().trim()));
                }
                if (!txtAvaluoFiscalTasaGara.getText().equals("")) {
                    tasaAuto.setAvaluo_fiscal_tasa(Integer.parseInt(txtAvaluoFiscalTasaGara.getText().trim()));
                }
                if (!txtValorPesosTasaGtia.getText().equals("")) {
                    tasaAuto.setValor_pesos_tasa(Integer.parseInt(txtValorPesosTasaGtia.getText().trim()));
                }
                if (!txtValorComercialTasa.getText().equals("")) {
                    tasaAuto.setValor_comercial_tasa(Integer.parseInt(txtValorComercialTasa.getText().trim()));
                }
                if (!txtMontoCubTasaGtia.getText().equals("")) {
                    tasaAuto.setMonto_cubierto_gara_tasa(Integer.parseInt(txtMontoCubTasaGtia.getText().trim()));
                }
                if (!txtResidualTasa.getText().equals("")) {
                    tasaAuto.setMonto_residual_tasa(Integer.parseInt(txtResidualTasa.getText().trim()));
                }
                if (!txtApeMaternoTasador.getText().equals("")) {
                    tasaAuto.setApellido_materno_tasador(txtApeMaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaAuto.setApellido_paterno_tasador(txtApePaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaAuto.setNombre_tasador(txtNombreTasador.getText());
                }
                tasaAuto.setAuto(auto.getAuto());
                int respuesta1 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Tasacion de garantia: AUTOMOTRIZ", "Tasacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta1 == 0) {
                    reg.TasacionGarantiaAuto(tasaAuto, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Tasacion Exitosa!");
                    MenuAdministrador admi = new MenuAdministrador(user);
                    admi.setVisible(true);
                    TasacionGarantia.this.dispose();
                }
                else
                {
                    
                }
                break;
           case "Warrant":
                tasacionGarantiaWarraDTO tasaWarra = new tasacionGarantiaWarraDTO();
                if (!txtValorContTasaGara.getText().equals("")) {
                    tasaWarra.setValor_contable_tasa(Integer.parseInt(txtValorContTasaGara.getText().trim()));
                }
                if (!txtValorLiqTasaGara.getText().equals("")) {
                   tasaWarra.setValor_liquidez_tasa(Integer.parseInt(txtValorLiqTasaGara.getText().trim()));
                }
                if (!txtAvaluoFiscalTasaGara.getText().equals("")) {
                    tasaWarra.setAvaluo_fiscal_tasa(Integer.parseInt(txtAvaluoFiscalTasaGara.getText().trim()));
                }
                if (!txtValorPesosTasaGtia.getText().equals("")) {
                    tasaWarra.setValor_pesos_tasa(Integer.parseInt(txtValorPesosTasaGtia.getText().trim()));
                }
                if (!txtValorComercialTasa.getText().equals("")) {
                    tasaWarra.setValor_comercial_tasa(Integer.parseInt(txtValorComercialTasa.getText().trim()));
                }
                if (!txtMontoCubTasaGtia.getText().equals("")) {
                    tasaWarra.setMonto_cubierto_gara_tasa(Integer.parseInt(txtMontoCubTasaGtia.getText().trim()));
                }
                if (!txtResidualTasa.getText().equals("")) {
                    tasaWarra.setMonto_residual_tasa(Integer.parseInt(txtResidualTasa.getText().trim()));
                }
                if (!txtApeMaternoTasador.getText().equals("")) {
                    tasaWarra.setApellido_materno_tasador(txtApeMaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaWarra.setApellido_paterno_tasador(txtApePaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaWarra.setNombre_tasador(txtNombreTasador.getText());
                }
                tasaWarra.setWarra(warra.getWarra());
                int respuesta2 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Tasacion de garantia: WARRANT", "Tasacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta2 == 0) {
                    reg.TasacionGarantiaWarra(tasaWarra, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Tasacion Exitosa!");
                    MenuAdministrador admi = new MenuAdministrador(user);
                    admi.setVisible(true);
                    TasacionGarantia.this.dispose();
                }
                else
                {
                    
                }
                break;     
           case "CDP":
                tasacionGarantiaCdpDTO tasaCDP = new tasacionGarantiaCdpDTO();
                if (!txtValorContTasaGara.getText().equals("")) {
                    tasaCDP.setValor_contable_tasa(Integer.parseInt(txtValorContTasaGara.getText().trim()));
                }
                if (!txtValorLiqTasaGara.getText().equals("")) {
                   tasaCDP.setValor_liquidez_tasa(Integer.parseInt(txtValorLiqTasaGara.getText().trim()));
                }
                if (!txtAvaluoFiscalTasaGara.getText().equals("")) {
                    tasaCDP.setAvaluo_fiscal_tasa(Integer.parseInt(txtAvaluoFiscalTasaGara.getText().trim()));
                }
                if (!txtValorPesosTasaGtia.getText().equals("")) {
                    tasaCDP.setValor_pesos_tasa(Integer.parseInt(txtValorPesosTasaGtia.getText().trim()));
                }
                if (!txtValorComercialTasa.getText().equals("")) {
                    tasaCDP.setValor_comercial_tasa(Integer.parseInt(txtValorComercialTasa.getText().trim()));
                }
                if (!txtMontoCubTasaGtia.getText().equals("")) {
                    tasaCDP.setMonto_cubierto_gara_tasa(Integer.parseInt(txtMontoCubTasaGtia.getText().trim()));
                }
                if (!txtResidualTasa.getText().equals("")) {
                    tasaCDP.setMonto_residual_tasa(Integer.parseInt(txtResidualTasa.getText().trim()));
                }
                if (!txtApeMaternoTasador.getText().equals("")) {
                    tasaCDP.setApellido_materno_tasador(txtApeMaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaCDP.setApellido_paterno_tasador(txtApePaternoTasador.getText());
                }
                if (!txtApePaternoTasador.getText().equals("")) {
                    tasaCDP.setNombre_tasador(txtNombreTasador.getText());
                }
                tasaCDP.setCdp(cdp.getCdp());
                int respuesta3 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Tasacion de garantia: CDP", "Tasacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta3 == 0) {
                    reg.TasacionGarantiaCDP(tasaCDP, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Tasacion Exitosa!");
                    MenuAdministrador admi = new MenuAdministrador(user);
                    admi.setVisible(true);
                    TasacionGarantia.this.dispose();
                }
                else
                {
                    
                }
                break;
        }
    }//GEN-LAST:event_btnGrabarTasaGtiaActionPerformed

    private void btnBuscarPatenteTasaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarPatenteTasaActionPerformed
       
        
        if (txtAutoTasa.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese PATENTE");
            this.btnGrabarTasaGtia.setVisible(false);
            this.btnGrabarTasaGtia.setVisible(false);
            this.txtHipoTasa.setText(null);
            this.txtAutoTasa.setText(null);
            this.txtWarraTasa.setText(null);
            this.txtCDPTasa.setText(null);
            totalALipmpiar();
        }
        else
        {
            auto = reg.ModiGtaBuscarPorPatente(txtAutoTasa.getText());
            if (auto.getId_tasa() != 0) 
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue tasada. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE TASACION.");
                txtRutGaraTasa.setText(auto.getAuto().getRut_gara_auto());
//                txtFolioGarTasa.setText(String.valueOf(auto.getAuto().getFolio_garantia_auto()));
                txtApellMatGarTasa.setText(auto.getAuto().getApell_materno_auto());
                txtApellPatGaraTasa.setText(auto.getAuto().getApell_paterno_auto());
                txtNombreGarTasa.setText(auto.getAuto().getNombre_auto());
                txtDescripcionTasaGara.setText(auto.getAuto().getDescrip_auto());
                txtOtroComentarioTasaGara.setText(auto.getAuto().getComent_auto());
                txtValorContTasaGara.setText(String.valueOf(auto.getValor_contable_tasa()));
                txtValorLiqTasaGara.setText(String.valueOf(auto.getValor_liquidez_tasa()));
                txtAvaluoFiscalTasaGara.setText(String.valueOf(auto.getAvaluo_fiscal_tasa()));
                txtValorPesosTasaGtia.setText(String.valueOf(auto.getValor_pesos_tasa()));
                txtApePaternoTasador.setText(auto.getApellido_paterno_tasador());
                txtApeMaternoTasador.setText(auto.getApellido_materno_tasador());
                txtNombreTasador.setText(auto.getNombre_tasador());
                txtValorComercialTasa.setText(String.valueOf(auto.getValor_comercial_tasa()));
                txtMontoCubTasaGtia.setText(String.valueOf(auto.getMonto_cubierto_gara_tasa()));
                txtResidualTasa.setText(String.valueOf(auto.getMonto_residual_tasa()));
                txtMontoInicial.setText(String.valueOf(auto.getAuto().getMonto_inicial()));
                //metoto que oculta los paneles que no se ocupan
//                ocultarPanel(pnlAutomotriz);
                //Bloquea controles
                TasacionHecha();
                this.txtHipoTasa.setText(null);
                this.txtWarraTasa.setText(null);
                this.txtCDPTasa.setText(null);
            }
            else
            {
                garantiaAutomotrizDTO aux = reg.buscarPorPatente(txtAutoTasa.getText());
                auto.setAuto(aux);
                if (auto.getAuto().getFolio_garantia_auto() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    this.btnGrabarTasaGtia.setVisible(false);
                    this.txtHipoTasa.setText(null);
                    this.txtAutoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                    this.btnGrabarTasaGtia.setVisible(false);
                    totalALipmpiar();
                }
                else
                {
                    txtRutGaraTasa.setText(auto.getAuto().getRut_gara_auto());
//                    txtFolioGarTasa.setText(String.valueOf(auto.getAuto().getFolio_garantia_auto()));
                    txtApellMatGarTasa.setText(auto.getAuto().getApell_materno_auto());
                    txtApellPatGaraTasa.setText(auto.getAuto().getApell_paterno_auto());
                    txtNombreGarTasa.setText(auto.getAuto().getNombre_auto());
                    txtDescripcionTasaGara.setText(auto.getAuto().getDescrip_auto());
                    txtOtroComentarioTasaGara.setText(auto.getAuto().getComent_auto());
                    txtMontoInicial.setText(String.valueOf(auto.getAuto().getMonto_inicial()));
                    TasacionNoHecha();
                    limpiar();
                    auxNombre = "Automotriz";
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlAutomotriz);
                    
                    this.txtHipoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                }
            }
            
        }
    }//GEN-LAST:event_btnBuscarPatenteTasaActionPerformed

    private void btnBuscarDUNTasaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarDUNTasaActionPerformed
        if (txtWarraTasa.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese DUN");
            this.btnGrabarTasaGtia.setVisible(false);
            this.btnGrabarTasaGtia.setVisible(false);
            this.txtHipoTasa.setText(null);
            this.txtAutoTasa.setText(null);
            this.txtWarraTasa.setText(null);
            this.txtCDPTasa.setText(null);
            totalALipmpiar();
        }
        else
        {
            warra = reg.ModiGtaBuscarPorDUN(txtWarraTasa.getText());
            if (warra.getId_tasa() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue tasada. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE TASACION.");
                txtRutGaraTasa.setText(warra.getWarra().getRut_garante_warra());
//                txtFolioGarTasa.setText(String.valueOf(warra.getWarra().getFolio_warra()));
                txtApellMatGarTasa.setText(warra.getWarra().getApell_materno_warra());
                txtApellPatGaraTasa.setText(warra.getWarra().getApell_paterno_warra());
                txtNombreGarTasa.setText(warra.getWarra().getNombre_warra());
                txtDescripcionTasaGara.setText(warra.getWarra().getDescrip_warra());
                txtOtroComentarioTasaGara.setText(warra.getWarra().getComent_warra());
                txtValorContTasaGara.setText(String.valueOf(warra.getValor_contable_tasa()));
                txtValorLiqTasaGara.setText(String.valueOf(warra.getValor_liquidez_tasa()));
                txtAvaluoFiscalTasaGara.setText(String.valueOf(warra.getAvaluo_fiscal_tasa()));
                txtValorPesosTasaGtia.setText(String.valueOf(warra.getValor_pesos_tasa()));
                txtApePaternoTasador.setText(warra.getApellido_paterno_tasador());
                txtApeMaternoTasador.setText(warra.getApellido_materno_tasador());
                txtNombreTasador.setText(warra.getNombre_tasador());
                txtValorComercialTasa.setText(String.valueOf(warra.getValor_comercial_tasa()));
                txtMontoCubTasaGtia.setText(String.valueOf(warra.getMonto_cubierto_gara_tasa()));
                txtResidualTasa.setText(String.valueOf(warra.getMonto_residual_tasa()));
                txtMontoInicial.setText(String.valueOf(warra.getWarra().getMonto_inicial()));
//                ocultarPanel(pnlWarrant);
                TasacionHecha();
                this.txtHipoTasa.setText(null);
                this.txtAutoTasa.setText(null);
                this.txtCDPTasa.setText(null);
            }
            else
            {
                garantiaWarrantsDTO aux = reg.buscarPorDUN(txtWarraTasa.getText());
                warra.setWarra(aux);
                if (warra.getWarra().getFolio_warra() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    this.btnGrabarTasaGtia.setVisible(false);
                    this.txtHipoTasa.setText(null);
                    this.txtAutoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                    this.btnGrabarTasaGtia.setVisible(false);
                    totalALipmpiar();
                }
                else
                {
                    txtRutGaraTasa.setText(warra.getWarra().getRut_garante_warra());
//                    txtFolioGarTasa.setText(String.valueOf(warra.getWarra().getFolio_warra()));
                    txtApellMatGarTasa.setText(warra.getWarra().getApell_materno_warra());
                    txtApellPatGaraTasa.setText(warra.getWarra().getApell_paterno_warra());
                    txtNombreGarTasa.setText(warra.getWarra().getNombre_warra());
                    txtDescripcionTasaGara.setText(warra.getWarra().getDescrip_warra());
                    txtOtroComentarioTasaGara.setText(warra.getWarra().getComent_warra());
                    txtMontoInicial.setText(String.valueOf(warra.getWarra().getMonto_inicial()));
                    TasacionNoHecha();
                    limpiar();
                    auxNombre = "Warrant";
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlWarrant);
                    
                    this.txtHipoTasa.setText(null);
                    this.txtAutoTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                }
            }
        }
    }//GEN-LAST:event_btnBuscarDUNTasaActionPerformed

    private void btnBuscarNumTasaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarNumTasaActionPerformed
        if (txtCDPTasa.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese NUMERO CDP");
            this.btnGrabarTasaGtia.setVisible(false);
            this.btnGrabarTasaGtia.setVisible(false);
            this.txtHipoTasa.setText(null);
            this.txtAutoTasa.setText(null);
            this.txtWarraTasa.setText(null);
            this.txtCDPTasa.setText(null);
            totalALipmpiar();
        }
        else
        {
            cdp = reg.ModiGtaBuscarPorNum(Integer.parseInt(txtCDPTasa.getText()));
            if (cdp.getId_tasa() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue tasada. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE TASACION.");
                txtRutGaraTasa.setText(cdp.getCdp().getRut_gara_cdp());
//                txtFolioGarTasa.setText(String.valueOf(cdp.getCdp().getFolio_cdp()));
                txtApellMatGarTasa.setText(cdp.getCdp().getApell_materno_cdp());
                txtApellPatGaraTasa.setText(cdp.getCdp().getApell_paterno_cdp());
                txtNombreGarTasa.setText(cdp.getCdp().getNombre_cdp());
                txtDescripcionTasaGara.setText(cdp.getCdp().getDescrip_cdp());
                txtOtroComentarioTasaGara.setText(cdp.getCdp().getComent_cdp());
                txtValorContTasaGara.setText(String.valueOf(cdp.getValor_contable_tasa()));
                txtValorLiqTasaGara.setText(String.valueOf(cdp.getValor_liquidez_tasa()));
                txtAvaluoFiscalTasaGara.setText(String.valueOf(cdp.getAvaluo_fiscal_tasa()));
                txtValorPesosTasaGtia.setText(String.valueOf(cdp.getValor_pesos_tasa()));
                txtApePaternoTasador.setText(cdp.getApellido_paterno_tasador());
                txtApeMaternoTasador.setText(cdp.getApellido_materno_tasador());
                txtNombreTasador.setText(cdp.getNombre_tasador());
                txtValorComercialTasa.setText(String.valueOf(cdp.getValor_comercial_tasa()));
                txtMontoCubTasaGtia.setText(String.valueOf(cdp.getMonto_cubierto_gara_tasa()));
                txtResidualTasa.setText(String.valueOf(cdp.getMonto_residual_tasa()));
                txtMontoInicial.setText(String.valueOf(cdp.getCdp().getMonto_inicial()));
//                ocultarPanel(pnlCdp);
                TasacionHecha();
                this.txtHipoTasa.setText(null);
                this.txtAutoTasa.setText(null);
                this.txtWarraTasa.setText(null);
            }
            else
            {
                garantiaCdpOtrosDTO aux = reg.buscarPorNum(Integer.parseInt(txtCDPTasa.getText().trim()));
                cdp.setCdp(aux);
                if (cdp.getCdp().getFolio_cdp() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    this.btnGrabarTasaGtia.setVisible(false);
                    this.txtHipoTasa.setText(null);
                    this.txtAutoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                    this.txtCDPTasa.setText(null);
                    this.btnGrabarTasaGtia.setVisible(false);
                    totalALipmpiar();
                }
                else
                {
                    txtRutGaraTasa.setText(cdp.getCdp().getRut_gara_cdp());
//                    txtFolioGarTasa.setText(String.valueOf(cdp.getCdp().getFolio_cdp()));
                    txtApellMatGarTasa.setText(cdp.getCdp().getApell_materno_cdp());
                    txtApellPatGaraTasa.setText(cdp.getCdp().getApell_paterno_cdp());
                    txtNombreGarTasa.setText(cdp.getCdp().getNombre_cdp());
                    txtDescripcionTasaGara.setText(cdp.getCdp().getDescrip_cdp());
                    txtOtroComentarioTasaGara.setText(cdp.getCdp().getComent_cdp());
                    txtMontoInicial.setText(String.valueOf(cdp.getCdp().getMonto_inicial()));
                    TasacionNoHecha();
                    limpiar();
                    auxNombre = "CDP";
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlCdp);
                    
                    this.txtHipoTasa.setText(null);
                    this.txtAutoTasa.setText(null);
                    this.txtWarraTasa.setText(null);
                }
            }
        }
    }//GEN-LAST:event_btnBuscarNumTasaActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        TasacionGarantia.this.dispose();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void btnMenuPrincipalTasacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalTasacionActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        TasacionGarantia.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalTasacionActionPerformed

    private void btnBuscarIdGarantiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarIdGarantiaActionPerformed
        String fechaImpresion = String.valueOf(Fechas.FechaSistema());
        if(this.rbtRolSii.isSelected())
         {
             
        try
        {
            DefaultTableModel modelo1 =(DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();      
             modelo1.setNumRows(0);
            ArrayList<tasacionGarantiaHipoDTO> salida = reg.ListarPorRolHipoTasa(this.txtBuscarIdGarantia.getText().trim());
            
            if(salida.isEmpty())
            {
                 
                 this.txtBuscarIdGarantia.setText(null);
                DefaultTableModel modelo =(DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();      
                modelo.setNumRows(0);
                javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
               
            }else
            {
            DefaultTableModel modelo =(DefaultTableModel)this.tbSalidaImprimirGarantia.getModel(); 
          
            modelo.setColumnCount(0);
                if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ","Calle: ", "Garantía: ", "Número identificatorio Hipotecario: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal:  ",
                        "Dirección (Crédito): ",
                        "Fecha último débito: ","Moneda: ","Comuna: ",
                        "Localidad Registro: ","Fecha última tasación: ",
                        "Fecha vencimiento: ","Fecha último Revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazado: ","Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ",
                        "Valor contable: ",
                        "Valor liquidez: ",
                        "Avaluo fiscal: ",
                        "Valor en pesos: ",
                        "Nombre del tasador: ",
                        "Valor comercial: ",
                        "Monto residual: ",
                        "Monto cubierto por Garantía: ",
                        "Fecha ingreso de la tasación: ",
                        "Usuario de ingreso de la tasación: ",
                        "Usuario de ingreso de la garantía: "  };
                    modelo.addColumn("Concepto", arr1);
                   
                    
                    for(tasacionGarantiaHipoDTO x: salida)
                {
                    Object[] arr2 ={
                        x.getHipo().getRut_gara_hipo(),
                        x.getHipo().getNombre_hipo()  + "  " + x.getHipo().getApell_materno_hipo() + "  " + x.getHipo().getApell_materno_hipo(),
                        x.getHipo().getCalle_hipo() + "  " + x.getHipo().getNum_dire_hipo(),x.getHipo().getNombre_garantia_hipo(),x.getHipo().getRol_sii_hipo(),x.getHipo().getFolio_garantia_hipo(),
                        x.getHipo().getMonto_inicial(),x.getHipo().getFech_crea_hipo(),x.getHipo().getSucursal_hipo(),
                        x.getHipo().getDireccion_hipo()+"  "+x.getHipo().getNum_hipo(),x.getHipo().getFech_ult_debito_hipo(),
                        x.getHipo().getMoneda_hipo(),x.getHipo().getComuna_hipo(),
                        x.getHipo().getLocalidad_reg_hipo(),x.getHipo().getFech_ult_tasa_hipo(),
                        x.getHipo().getFech_extincion_hipo(),x.getHipo().getFech_ult_revaluo_hipo(),
                        x.getHipo().getFech_ult_credito_hipo(),x.getHipo().getEstado_hipo(),x.getHipo().getFech_crea_hipo(),x.getHipo().getFech_modifi_hipo(),fechaImpresion,fechaImpresion,
                        x.getHipo().getEstado_alza(),
                        x.getValor_contable_tasa(),
                        x.getValor_liquidez_tasa(),
                        x.getAvaluo_fiscal_tasa(),
                        x.getValor_pesos_tasa(),
                        x.getNombre_tasador() + " " + x.getApellido_paterno_tasador() + " " + x.getApellido_materno_tasador(),
                        x.getValor_comercial_tasa(),
                        x.getMonto_residual_tasa(),
                        x.getMonto_cubierto_gara_tasa(),
                        fechaImpresion,
                        x.getNombre_usuario(),
                        x.getNombre_usuario()

                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," "," "
                                    ," "," "," "," "," "," "," "," "," "," "
                                    ," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
            }
        }catch(Exception e)
        {
            e.getMessage();
        }
         }
         else if(this.rbtPatente.isSelected())
         {
             
              try
         {
            DefaultTableModel modelo2 =(DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();      
             modelo2.setNumRows(0);
             ArrayList<garantiaAutomotrizDTO> salida = reg.ListarPorPatenteAuto(this.txtBuscarIdGarantia.getText().trim());
             if(salida.isEmpty())
             {
                
                 this.txtBuscarIdGarantia.setText(null);
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();
                 model.setNumRows(0);
                 javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
             }else
             {
                 
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();
                 model.setColumnCount(0);
                 
                 if(model.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio Automotriz: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal:  ",
                        "Dirección (Crédito): ","Fecha ultimo debito",
                        "Moneda: ","Fecha última Tasación: ",
                        "Fecha vencimiento: ","Fecha último revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazo: ","Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ","Usuario: " };
                    model.addColumn("Concepto", arr1);
                    
                    for(garantiaAutomotrizDTO a: salida)
                {
                    Object[] arr2 ={
                         a.getRut_gara_auto(),
                         a.getNombre_auto() + "  " + a.getApell_paterno_auto() + "  " + a.getApell_materno_auto(),
                         a.getCalle_auto() + "  " + a.getNum_auto(),
                         a.getNombre_garantia_auto(),
                         a.getPatente_auto(),
                         a.getFolio_garantia_auto(),
                         a.getMonto_inicial(),
                         a.getFech_crea_auto(),
                         a.getSucursal_auto(),
                         a.getDireccion_auto(),a.getFech_ult_debito_auto(),
                         a.getMoneda_auto(),a.getFecha_ult_tasa_auto(),
                         a.getFech_extincion_auto(),
                         a.getFech_ult_reval_auto(),a.getFech_ult_reval_credito_auto(),
                         a.getEstado_auto(),
                         a.getFech_crea_auto(),
                         a.getFecha_modifi_auto(),
                         fechaImpresion,
                         fechaImpresion,
                         a.getEstado_alza(),
                         a.getNombre_usuario()
                    };
                     
                    model.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "};
                    model.addColumn("Observaciones",arr3);
                    
                }

             }
         }
         catch(Exception e)
         {
             e.getMessage();
         }
         }
         else if(this.rbtDun.isSelected())
         {
          try{
             DefaultTableModel modelo3 =(DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();      
             modelo3.setNumRows(0);
            ArrayList<garantiaWarrantsDTO> salida = reg.ListarPorDunWarra(this.txtBuscarIdGarantia.getText().trim());
            if(salida.isEmpty())
            {
                
                this.txtBuscarIdGarantia.setText(null);
                DefaultTableModel model = (DefaultTableModel)tbSalidaImprimirGarantia.getModel();
                model.setNumRows(0);
                javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
            }
            else
            {
                
                DefaultTableModel model = (DefaultTableModel)tbSalidaImprimirGarantia.getModel();
                model.setColumnCount(0);
                
                if(model.getColumnCount() < 1)
                {
                   
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio Warrant: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal: ",
                        "Fecha último debito: ", "Moneda: ","Fecha última Tasación: ",
                        "Fecha vencimiento: ","Fecha último revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazado: ","Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ",
                        "Usuario: " };
                    model.addColumn("Concepto", arr1);
                    
                    for(garantiaWarrantsDTO w: salida)
                {
                    Object[] arr2 ={
                    w.getRut_garante_warra(),
                    w.getNombre_warra() + "  " + w.getApell_paterno_warra() + "  " + w.getApell_materno_warra(),
                    w.getCalle_warra() + "  " + w.getNum_warra(),
                    w.getNom_garantia_warra(),
                    w.getDun_warra(),w.getFolio_warra(),w.getMonto_inicial(),w.getFech_crea_warra(),
                    w.getNom_sucursal_warra(),w.getFech_ult_deb_warra(),
                    w.getNom_moneda_warra(),w.getFech_ult_tasa_warra(),
                    w.getFech_exti_warra(),w.getFech_ult_reval_warra(),w.getFech_ult_cred_warra(),
                    w.getEstado_warra(),w.getFech_crea_warra(),w.getFech_modifi_warra(),
                    fechaImpresion,
                    fechaImpresion,
                    w.getEstado_alza(),
                    w.getNombre_usuario()
                    };
                     
                    model.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," "," "," "};
                    model.addColumn("Observaciones",arr3);
                    
                }
                
               
            }
        }
        catch(Exception e)
        {
            e.getMessage();
        }
         }
         else if (this.rbtNumeroCdp.isSelected())
         {
              try
       {
           
             DefaultTableModel modelo4 =(DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();      
             modelo4.setNumRows(0);
           ArrayList<garantiaCdpOtrosDTO> salida = reg.ListarPorCdp(Integer.parseInt(this.txtBuscarIdGarantia.getText().trim()));
           if(salida.isEmpty())
           {
               
               this.txtBuscarIdGarantia.setText(null);
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();
               modelo.setNumRows(0);
               javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           }
           else
           {
               
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirGarantia.getModel();
               modelo.setColumnCount(0);
               
               if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio CDP: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal: ",
                        "Fecha último debito: ","Moneda: ","Fecha última tasación","Fecha vencimiento: ",
                        "Fecha último revaluo: ","Fecha último credito: ","Estado de la garantía: ","Fecha aprobado/Rechazado: ",
                        "Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ",
                        "Usuario: " };
                    modelo.addColumn("Concepto", arr1);
                    
                    for(garantiaCdpOtrosDTO c: salida)
                {
                    Object[] arr2 ={
                                   c.getRut_gara_cdp(),
                                   c.getNombre_cdp() + "  " + c.getApell_paterno_cdp() + "  " + c.getApell_materno_cdp(),
                                   c.getCalle_cdp() + "  " + c.getNumero_calle_cdp(),
                                   c.getNom_garantia_cdp(),
                                   c.getNum_cdp(),
                                   c.getFolio_cdp(),
                                   c.getMonto_inicial(),
                                   c.getFech_crea_cdp(),
                                   c.getSucu_cdp(),
                                   c.getFech_ult_deb_cdp(),
                                   c.getNom_moneda_cdp(),
                                   c.getFech_ult_tasa_cdp(),
                                   c.getFech_extin_cdp(),
                                   c.getFech_ult_reval_cdp(),
                                   c.getFech_ult_cred_cdp(),
                                   c.getEstado_cdp(),
                                   c.getFech_crea_cdp(),
                                   c.getFech_modif_cdp(),
                                   fechaImpresion,
                                   fechaImpresion,
                                   c.getEstado_alza(),
                                   c.getNombre_usuario()
                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
    
           }
       }
       catch(Exception e)
       {
           e.getMessage();
       }
         }
    }//GEN-LAST:event_btnBuscarIdGarantiaActionPerformed

    private void btnImprimirGarantiasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirGarantiasActionPerformed
      if(this.rbtRolSii.isSelected())
        {
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirGarantia.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Ingreso Tasación Hipotecaria");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
        else if(this.rbtPatente.isSelected())
        {
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirGarantia.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Ingreso Tasación Automotriz");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
        else if(this.rbtDun.isSelected())
        {
             try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirGarantia.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Ingreso Tasación Warrant");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
        else if (this.rbtNumeroCdp.isSelected())
        {
             try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirGarantia.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirGarantia.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Ingreso Tasación CDP");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
    }//GEN-LAST:event_btnImprimirGarantiasActionPerformed

    /** Si la tasacion fue hecha, muestra el mensaje, desaparece el boton grabar
     e inhabilita los texbox */
     private void TasacionHecha()
     {
          btnGrabarTasaGtia.setVisible(false);
          txtValorContTasaGara.setEditable(false);
          txtValorLiqTasaGara.setEditable(false);
          txtAvaluoFiscalTasaGara.setEditable(false);
          txtValorPesosTasaGtia.setEditable(false);
          txtApePaternoTasador.setEditable(false);
          txtApeMaternoTasador.setEditable(false);
          txtNombreTasador.setEditable(false);
          txtValorComercialTasa.setEditable(false);
          txtMontoCubTasaGtia.setEditable(false);
          txtResidualTasa.setEditable(false);
     }
     
     private void TasacionNoHecha()
     {
          btnGrabarTasaGtia.setVisible(true);
          txtValorContTasaGara.setEditable(true);
          txtValorLiqTasaGara.setEditable(true);
          txtAvaluoFiscalTasaGara.setEditable(true);
          txtValorPesosTasaGtia.setEditable(true);
          txtApePaternoTasador.setEditable(true);
          txtApeMaternoTasador.setEditable(true);
          txtNombreTasador.setEditable(true);
          txtValorComercialTasa.setEditable(true);
          txtMontoCubTasaGtia.setEditable(true);
          txtResidualTasa.setEditable(true);
     }
             
    
//    private void ocultarPanel(JPanel panel)
//    {
//        pnlAutomotriz.setEnabled(false);
//        pnlCdp.setEnabled(false);
//        pnlHipotecaria.setEnabled(false);
//        pnlWarrant.setEnabled(false);
//        /*BOTONES*/
//        txtHipoTasa.setEditable(false);
//        btnBuscarRolTasa.setEnabled(false);
//        txtAutoTasa.setEditable(false);
//        btnBuscarPatenteTasa.setEnabled(false);
//        txtWarraTasa.setEditable(false);
//        btnBuscarDUNTasa.setEnabled(false);
//        txtCDPTasa.setEditable(false);
//        btnBuscarNumTasa.setEnabled(false);
//        panel.setEnabled(true);
//    }
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(TasacionGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(TasacionGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(TasacionGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(TasacionGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new TasacionGarantia().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscarDUNTasa;
    private javax.swing.JButton btnBuscarIdGarantia;
    private javax.swing.JButton btnBuscarNumTasa;
    private javax.swing.JButton btnBuscarPatenteTasa;
    private javax.swing.JButton btnBuscarRolTasa;
    private javax.swing.JButton btnGrabarTasaGtia;
    private javax.swing.JButton btnImprimirGarantias;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.JButton btnMenuPrincipalTasacion;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblIngresoGaraAuto;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JPanel pnlAutomotriz;
    private javax.swing.JPanel pnlCdp;
    private javax.swing.JPanel pnlDatosPersoGara1;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JPanel pnlHipotecaria;
    private javax.swing.JPanel pnlWarrant;
    private javax.swing.JRadioButton rbtDun;
    private javax.swing.JRadioButton rbtNumeroCdp;
    private javax.swing.JRadioButton rbtPatente;
    private javax.swing.JRadioButton rbtRolSii;
    private javax.swing.JTable tbSalidaImprimirGarantia;
    private javax.swing.JTextField txtApeMaternoTasador;
    private javax.swing.JTextField txtApePaternoTasador;
    private javax.swing.JTextField txtApellMatGarTasa;
    private javax.swing.JTextField txtApellPatGaraTasa;
    private javax.swing.JTextField txtAutoTasa;
    private javax.swing.JTextField txtAvaluoFiscalTasaGara;
    private javax.swing.JTextField txtBuscarIdGarantia;
    private javax.swing.JTextField txtCDPTasa;
    private javax.swing.JTextArea txtDescripcionTasaGara;
    private javax.swing.JTextField txtHipoTasa;
    private javax.swing.JTextField txtMontoCubTasaGtia;
    private javax.swing.JTextField txtMontoInicial;
    private javax.swing.JTextField txtNombreGarTasa;
    private javax.swing.JTextField txtNombreTasador;
    private javax.swing.JTextArea txtOtroComentarioTasaGara;
    private javax.swing.JTextField txtResidualTasa;
    private javax.swing.JTextField txtRutGaraTasa;
    private javax.swing.JTextField txtValorComercialTasa;
    private javax.swing.JTextField txtValorContTasaGara;
    private javax.swing.JTextField txtValorLiqTasaGara;
    private javax.swing.JTextField txtValorPesosTasaGtia;
    private javax.swing.JTextField txtWarraTasa;
    // End of variables declaration//GEN-END:variables

    private void limpiar() {
          txtValorContTasaGara.setText(null);
          txtValorLiqTasaGara.setText(null);
          txtAvaluoFiscalTasaGara.setText(null);
          txtValorPesosTasaGtia.setText(null);
          txtApePaternoTasador.setText(null);
          txtApeMaternoTasador.setText(null);
          txtNombreTasador.setText(null);
          txtValorComercialTasa.setText(null);
          txtMontoCubTasaGtia.setText(null);
          txtResidualTasa.setText(null);
    }

    private void totalALipmpiar() {
        txtValorContTasaGara.setText(null);
          txtValorLiqTasaGara.setText(null);
          txtAvaluoFiscalTasaGara.setText(null);
          txtValorPesosTasaGtia.setText(null);
          txtApePaternoTasador.setText(null);
          txtApeMaternoTasador.setText(null);
          txtNombreTasador.setText(null);
          txtValorComercialTasa.setText(null);
          txtMontoCubTasaGtia.setText(null);
          txtResidualTasa.setText(null);
          txtRutGaraTasa.setText(null);
//          txtFolioGarTasa.setText(null);
          txtApellMatGarTasa.setText(null);
          txtApellPatGaraTasa.setText(null);
          txtNombreGarTasa.setText(null);
          txtDescripcionTasaGara.setText(null);
          txtOtroComentarioTasaGara.setText(null);
          txtMontoInicial.setText(null);
    }
}
